package com.inno.lock.processor.annotiation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.concurrent.TimeUnit;

/**
 * @author shenzeyang
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface DistributedLock {
    /**
     * key
     */
    String key();

    /**
     * 持有锁的时长 默认秒
     */
    long expireTime();

    /**
     * 单位
     */
    TimeUnit timeUnit() default TimeUnit.SECONDS;

}
